package com.legsem.legstar.jca;

import javax.resource.ResourceException;
import javax.resource.cci.ConnectionMetaData;
import javax.resource.spi.ManagedConnectionMetaData;

public class LegStarManagedConnectionMetaDataImpl implements
        ManagedConnectionMetaData {

    private static final int MAX_CONNECTIONS = Integer.MAX_VALUE;

    private ConnectionMetaData cxMetaData;

    /**
     * Constructor for LegStarManagedConnectionMetaDataImpl
     */
    public LegStarManagedConnectionMetaDataImpl(ConnectionMetaData cxMetaData) {

        super();
        this.cxMetaData = cxMetaData;
    }

    /**
     * @see ManagedConnectionMetaData#getEISProductName()
     */
    public String getEISProductName() throws ResourceException {

        return cxMetaData.getEISProductName();
    }

    /**
     * @see ManagedConnectionMetaData#getEISProductVersion()
     */
    public String getEISProductVersion() throws ResourceException {

        return cxMetaData.getEISProductVersion();
    }

    /**
     * @see ManagedConnectionMetaData#getMaxConnections()
     */
    public int getMaxConnections() throws ResourceException {

        return MAX_CONNECTIONS;
    }

    /**
     * @see ManagedConnectionMetaData#getUserName()
     */
    public String getUserName() throws ResourceException {

        return cxMetaData.getUserName();
    }
}
